package cn.xq.pethome.sysDictType.service.Impl;

import cn.xq.pethome.base.service.impl.BaseServiceImpl;
import cn.xq.pethome.sysDictType.domain.Dictype;
import cn.xq.pethome.sysDictType.mapper.DictypeMapper;
import cn.xq.pethome.sysDictType.query.DictypeQuery;
import cn.xq.pethome.sysDictType.service.IDicTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class DicTypeServiceimpl extends BaseServiceImpl<Dictype> implements IDicTypeService {
   @Autowired
   private DictypeMapper dictypeMapper;


    @Transactional
    @Override
    public void insert(Dictype dictype) {
        dictypeMapper.insert(dictype);
    }
    @Transactional
    @Override
    public void delete(Long id) {
        dictypeMapper.delete(id);
    }
    @Transactional
    @Override
    public void update(Dictype dictype) {
        dictypeMapper.update(dictype);
    }

    @Override
    public Dictype findone(Long id) {
        return dictypeMapper.fingone(id);
    }

    @Override
    public List<Dictype> findall() {
        return dictypeMapper.fingall();
    }

    @Override
    public List<Dictype> findquery(DictypeQuery dictypeQuery) {
        return dictypeMapper.findquery(dictypeQuery);
    }

    @Override
    public Long findquerycount(DictypeQuery dictypeQuery) {
        return dictypeMapper.fingquerycount(dictypeQuery);
    }
}
